﻿Namespace ControlLibrary
    ''' <summary>
    ''' This class will apply predefined styles that ship as resources to the dbiSchedule, dbiDayView and dbiList controls.
    ''' </summary>
    Public Class StylerResource
        Private l_ScheduleXML As String
        Private l_DayViewXML As String
        Private l_dbiListXML As String

        ''' <summary>The property containing the XML Style string for a dbiSchedule</summary>
        Public Property ScheduleXML() As String
            Get
                Return l_ScheduleXML
            End Get
            Set(ByVal value As String)
                l_ScheduleXML = value
            End Set
        End Property

        ''' <summary>The property containing the XML Style string for a dbiDayView</summary>
        Public Property DayViewXML() As String
            Get
                Return l_DayViewXML
            End Get
            Set(ByVal value As String)
                l_DayViewXML = value
            End Set
        End Property

        ''' <summary>The property containing the XML Style string for a dbiList</summary>
        Public Property dbiListXML() As String
            Get
                Return l_dbiListXML
            End Get
            Set(ByVal value As String)
                l_dbiListXML = value
            End Set
        End Property

    End Class



    Public Class dbiStylerOptions
        ''' <summary>
        ''' The function used to retrieve the resources for a specific color scheme.
        ''' These are added to the Project.Resources file as XML Strings.
        ''' For more information see the project.resources for the project.
        ''' </summary>
        ''' <param name="ColorSchemeName">Represents the available color options.</param>
        ''' <returns>StylerResource</returns>
        ''' <remarks></remarks>
        Public Shared Function GetResources(ByVal ColorSchemeName As String) As StylerResource
            Dim curResource As New StylerResource

            Select Case ColorSchemeName
                Case "Blue"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleBlue
                    curResource.DayViewXML = My.Resources.DayviewStyleBlue
                    curResource.dbiListXML = My.Resources.ListStyleBlue
                Case "CPITF"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleCPITF
                    curResource.DayViewXML = My.Resources.DayviewStyleCPITF
                    curResource.dbiListXML = My.Resources.ListStyleCPITF
                Case "Gold"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleGold
                    curResource.DayViewXML = My.Resources.DayviewStyleGold
                    curResource.dbiListXML = My.Resources.ListStyleGold
                Case "Green"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleGreen
                    curResource.DayViewXML = My.Resources.DayViewStyleGreen
                    curResource.dbiListXML = My.Resources.ListStyleGreen
                Case "Orange"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleOrange
                    curResource.DayViewXML = My.Resources.DayviewStyleOrange
                    curResource.dbiListXML = My.Resources.ListStyleOrange
                Case "Purple"
                    curResource.ScheduleXML = My.Resources.ScheduleStylePurple
                    curResource.DayViewXML = My.Resources.DayviewStylePurple
                    curResource.dbiListXML = My.Resources.ListStylePurple
                Case "Red"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleRed
                    curResource.DayViewXML = My.Resources.DayviewStyleRed
                    curResource.dbiListXML = My.Resources.ListStyleRed
                Case "WPF"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleWPF
                    curResource.DayViewXML = My.Resources.DayviewStyleWPF
                    curResource.dbiListXML = My.Resources.ListStyleWPF
                Case "MintChocolate"
                    curResource.ScheduleXML = My.Resources.ScheduleStyleMintChocolate
                    curResource.DayViewXML = My.Resources.DayViewStyleMintChocolate
                    curResource.dbiListXML = My.Resources.ListStyleMintChocolate
                Case Else
                    curResource.ScheduleXML = My.Resources.ScheduleStyleBlue
                    curResource.DayViewXML = My.Resources.DayviewStyleBlue
                    curResource.dbiListXML = My.Resources.ListStyleBlue
            End Select
            Return curResource

        End Function

        ''' <summary>
        ''' Specifies how to apply styles to a dbiSchedule using the dbiWSFStyleControls class.
        ''' </summary>
        Public Class dbiScheduleStyleOptions
            Private l_Name As String = "dbiSchedule"
            Private l_TimeBars As Boolean = True
            Private l_List As Boolean = True
            Private l_ToolTips As Boolean = True
            Private l_ScheduleControl As Boolean = True
            Private l_Headers As Boolean = True
            Private l_Title As Boolean = True
            Private l_PreColumn As Boolean = True
            Private l_Schedules As Boolean = True

            ''' <summary>Determines the type of control to apply the dbiWSFStyler to.
            ''' This is read only as it is hardcoded for each class/control.</summary>
            Public ReadOnly Property Name() As String
                Get
                    Return l_Name
                End Get
            End Property

            ''' <summary>Determines if the Timebars node of the styler should be used.</summary>
            Public Property TimeBars() As Boolean
                Get
                    Return l_TimeBars
                End Get
                Set(ByVal value As Boolean)
                    l_TimeBars = value
                End Set
            End Property

            ''' <summary>Determines if the List node of the styler should be used.</summary>
            Public Property List() As Boolean
                Get
                    Return l_List
                End Get
                Set(ByVal value As Boolean)
                    l_List = value
                End Set
            End Property

            ''' <summary>Determines if the ToolTips node of the styler should be used.</summary>
            Public Property ToolTips() As Boolean
                Get
                    Return l_ToolTips
                End Get
                Set(ByVal value As Boolean)
                    l_ToolTips = value
                End Set
            End Property

            ''' <summary>Determines if the Schedule node of the styler should be used.</summary>
            Public Property ScheduleControl() As Boolean
                Get
                    Return l_ScheduleControl
                End Get
                Set(ByVal value As Boolean)
                    l_ScheduleControl = value
                End Set
            End Property

            ''' <summary>Determines if the Headers node of the styler should be used.</summary>
            Public Property Headers() As Boolean
                Get
                    Return l_Headers
                End Get
                Set(ByVal value As Boolean)
                    l_Headers = value
                End Set
            End Property

            ''' <summary>Determines if the Title node of the styler should be used.</summary>
            Public Property Title() As Boolean
                Get
                    Return l_Title
                End Get
                Set(ByVal value As Boolean)
                    l_Title = value
                End Set
            End Property

            ''' <summary>Determines if the PreColumn node of the styler should be used.</summary>
            Public Property PreColumn() As Boolean
                Get
                    Return l_PreColumn
                End Get
                Set(ByVal value As Boolean)
                    l_PreColumn = value
                End Set
            End Property

            ''' <summary>Determines if the Schedules node of the styler should be used.</summary>
            Public Property Schedules() As Boolean
                Get
                    Return l_Schedules
                End Get
                Set(ByVal value As Boolean)
                    l_Schedules = value
                End Set
            End Property

        End Class

        ''' <summary>
        ''' Specifies how to apply styles to a dbiDayView using the dbiWSFStyleControls class.
        ''' </summary>
        Public Class dbiDayViewStyleOptions
            Private l_Name As String = "dbiDayView"
            Private l_Appointments As Boolean = True
            Private l_AllDay As Boolean = True
            Private l_Headers As Boolean = True
            Private l_Title As Boolean = True
            Private l_DayView As Boolean = True
            Private l_Columns As Boolean = True
            Private l_TimeLine As Boolean = True

            ''' <summary>Determines the type of control to apply the dbiWSFStyler to.
            ''' This is read only as it is hardcoded for each class/control.</summary>
            Public ReadOnly Property Name() As String
                Get
                    Return l_Name
                End Get
            End Property

            ''' <summary>Determines if the Appointments node of the styler should be used.</summary>
            Public Property Appointments() As Boolean
                Get
                    Return l_Appointments
                End Get
                Set(ByVal value As Boolean)
                    l_Appointments = value
                End Set
            End Property

            ''' <summary>Determines if the AllDay node of the styler should be used.</summary>
            Public Property AllDay() As Boolean
                Get
                    Return l_AllDay
                End Get
                Set(ByVal value As Boolean)
                    l_AllDay = value
                End Set
            End Property

            ''' <summary>Determines if the Headers node of the styler should be used.</summary>
            Public Property Headers() As Boolean
                Get
                    Return l_Headers
                End Get
                Set(ByVal value As Boolean)
                    l_Headers = value
                End Set
            End Property

            ''' <summary>Determines if the Title node of the styler should be used.</summary>
            Public Property Title() As Boolean
                Get
                    Return l_Title
                End Get
                Set(ByVal value As Boolean)
                    l_Title = value
                End Set
            End Property

            ''' <summary>Determines if the DayView node of the styler should be used.</summary>
            Public Property DayView() As Boolean
                Get
                    Return l_DayView
                End Get
                Set(ByVal value As Boolean)
                    l_DayView = value
                End Set
            End Property

            ''' <summary>Determines if the Columns node of the styler should be used.</summary>
            Public Property Columns() As Boolean
                Get
                    Return l_Columns
                End Get
                Set(ByVal value As Boolean)
                    l_Columns = value
                End Set
            End Property

            ''' <summary>Determines if the TimeLine node of the styler should be used.</summary>
            Public Property TimeLine() As Boolean
                Get
                    Return l_TimeLine
                End Get
                Set(ByVal value As Boolean)
                    l_TimeLine = value
                End Set
            End Property
        End Class


        ''' <summary>
        ''' Specifies how to apply styles to a dbiList using the dbiWSFStyleControls class.
        ''' </summary>
        Public Class dbiListStyleOptions
            Private l_Name As String = "dbiList"
            Private l_Items As Boolean = True
            Private l_List As Boolean = True
            Private l_Headers As Boolean = True
            Private l_Title As Boolean = True
            Private l_PreColumn As Boolean = True

            ''' <summary>Determines the type of control to apply the dbiWSFStyler to.
            ''' This is read only as it is hardcoded for each class/control.</summary>
            Public ReadOnly Property Name() As String
                Get
                    Return l_Name
                End Get
            End Property

            ''' <summary>Determines if the Items node of the styler should be used.</summary>
            Public Property Items() As Boolean
                Get
                    Return l_Items
                End Get
                Set(ByVal value As Boolean)
                    l_Items = value
                End Set
            End Property

            ''' <summary>Determines if the List node of the styler should be used.</summary>
            Public Property List() As Boolean
                Get
                    Return l_List
                End Get
                Set(ByVal value As Boolean)
                    l_List = value
                End Set
            End Property

            ''' <summary>Determines if the Headers node of the styler should be used.</summary>
            Public Property Headers() As Boolean
                Get
                    Return l_Headers
                End Get
                Set(ByVal value As Boolean)
                    l_Headers = value
                End Set
            End Property

            ''' <summary>Determines if the Title node of the styler should be used.</summary>
            Public Property Title() As Boolean
                Get
                    Return l_Title
                End Get
                Set(ByVal value As Boolean)
                    l_Title = value
                End Set
            End Property

            ''' <summary>Determines if the PreColumn node of the styler should be used.</summary>
            Public Property PreColumn() As Boolean
                Get
                    Return l_PreColumn
                End Get
                Set(ByVal value As Boolean)
                    l_PreColumn = value
                End Set
            End Property

        End Class

    End Class
End Namespace
